{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 写出自己的函数\n",
    "### 自定义函数\n",
    "\n",
    "def 函数名(传入的变量，也叫参数):\n",
    "    \n",
    "    函数体，\n",
    "\n",
    "    可以是很多条语句\n",
    "    \n",
    "    return 返回值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3\n",
      "11\n",
      "31\n"
     ]
    }
   ],
   "source": [
    "a=1\n",
    "b=2\n",
    "c=a+b\n",
    "print(c)\n",
    "\n",
    "#写一个简单的加法吧\n",
    "def a_add_b(a,b):\n",
    "    c=a+b     \n",
    "    return c\n",
    "\n",
    "print(a_add_b(3,8))\n",
    "print(a_add_b(13,18))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5.0\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#直角三解形，用勾股定理算第斜边\n",
    "def calc_c(a,b):\n",
    "    #a方+b方\n",
    "    cc=a**2+b**2\n",
    "    #开个根号\n",
    "    c=math.sqrt(cc)\n",
    "    return c\n",
    "\n",
    "a=4\n",
    "b=3\n",
    "c=calc_c(a,b)\n",
    "print(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "#y=x*x+2x+1\n",
    "def fun1(x):\n",
    "    return x*x+2*x+1\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "961\n"
     ]
    }
   ],
   "source": [
    "print(fun1(30))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 来看一下，这个函数的图像吧"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "import time\n",
    "import numpy\n",
    "import matplotlib.pyplot as plt\n",
    "from IPython import display"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3deViVdf7/8eebHUQEZREBBRUXXFLD3bJyK1tsmcoWs7KxZqypppn5VTPzramZqVma9s3KssXMvmZZWmZpmru474qALIKgyKLsnM/vD27nS+aCCNxneT+ui8tzPuc+nNcdVy9u7uVzizEGpZRSnsHL7gBKKaVajpa+Ukp5EC19pZTyIFr6SinlQbT0lVLKg/jYHeBMwsPDTXx8vN0xlFLKpWzYsOGwMSbiVK85denHx8eTkpJidwyllHIpInLgdK/p7h2llPIgWvpKKeVBtPSVUsqDaOkrpZQH0dJXSikPoqWvlFIeREtfKaU8iJa+Uko5mc82ZvNpShbNMfW9lr5SSjkRh8Pw3Ld7+XxzDiLS5N9fS18ppZzIj6mHySkqZ+LAjs3y/bX0lVLKicxel0lYkC9je0U1y/fX0ldKKSdRUFrJ4p2HuGFALP4+3s3yGVr6SinlJOZuzKbGYZg4qHl27UADSl9E4kRkqYjsFJEdIvKgNf6kiOSIyGbra3y99zwmIqkiskdExtUbv9waSxWRR5tnlZRSyvU4HIZP1mcxKL4tXSODm+1zGjK1cg3wiDFmo4i0BjaIyGLrteeNMf+uv7CIJAETgV5AB+A7EelmvfwqMAbIBtaLyHxjzM6mWBGllHJlq9OOkH74OA+OSmzWzzlr6RtjcoFc63GpiOwCYs7wlgnAbGNMJZAuIqnAIOu1VGNMGoCIzLaW1dJXSnm8j9YeICzIl8t7t2/WzzmnffoiEg/0B9ZaQ/eLyFYRmSEiYd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+MQARSaLufgm9gMuB10TE5e8jaK3Dq9T9TJOAW6x1dTc1wCPGmCRgCDDNWs9Hge+NMYnA99Zzd/MgsKve838AzxtjugJHgSm2pGoiWvpN73ngD0D9I+QTgPdNnTVAqIhE25KuiRljvjXG1FhP11B3NzSoW+fZxphKY0w6kAoMsiNjExsEpBpj0owxVcBs6tbVrRhjco0xG63HpdSVYAx16zrTWmwmcK09CZuHiMQCVwJvW88FuAz4X2sRl19nLf0mJCITgBxjzJaTXjrVDeFjWixYy7kb+Np67K7r7K7rdVoiEg/0B9YCUcaYXOulPCDKpljN5QXqNtoc1vN2QFG9DRuX/3k73Y3RnZ2IfAe0P8VLfwQep27Xjls50zobY76wlvkjdbsEPmrJbKp5iUgwMBd4yBhTUrfhW8cYY0TEbc75FpGrgHxjzAYRucTuPM1FS/8cGWNGn2pcRPoACcAW63+MWGCjiAzCxW8If7p1PkFE7gSuAkaZ/7vww6XX+Qzcdb1+RkR8qSv8j4wxn1nDh0Qk2hiTa+2izLcvYZMbDlwjIuOBACAEeJG63bE+1ta+y/+8dfdOEzHGbDPGRBpj4o0x8dT9GTjAGJNH3c3f77DO4hkCFNf7E9mlicjl1P05fI0xpqzeS/OBiSLiLyIJ1B3EXmdHxia2Hki0zujwo+5g9XybMzU5a1/2O8AuY8x/6r00H5hsPZ4MfNHS2ZqLMeYxY0ys9f/vRGCJMeY2YCnwC2sxl19n3dJvGQuB8dQdzCwD7rI3TpN6BfAHFlt/4awxxtxnjNkhInOAndTt9plmjKm1MWeTMMbUiMj9wCLAG5hhjNlhc6zmMByYBGwTkc3W2OPAs8AcEZlC3bTnN9mUryX9P2C2iPwV2ETdL0OXpdMwKKWUB9HdO0op5UG09JVSyoNo6SullAfR0ldKKQ+ipa+UUh5ES18ppTyIlr5SSnmQ/w/JK2fJk0wZQgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "X = numpy.linspace(-50,50,1000)\n",
    "Y = fun1(X)\n",
    "plt.plot(X,Y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "---\n",
    "# 一元二次方程\n",
    "![](asserts/一元二次-推导过程.png)\n",
    "![](asserts/一元二次-结论.png)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
